import request from '@/utils/request'

// 查询支付订单列表
export function listTrade(query) {
    return request({
        url: '/logistics/trade/list',
        method: 'get',
        params: query
    })
}

// 查询支付订单详细
export function getTrade(tradeId) {
    return request({
        url: '/logistics/trade/' + tradeId,
        method: 'get'
    })
}

// 新增支付订单
export function addTrade(data) {
    return request({
        url: '/logistics/trade',
        method: 'post',
        data: data
    })
}

// 修改支付订单
export function updateTrade(data) {
    return request({
        url: '/logistics/trade',
        method: 'put',
        data: data
    })
}

// 删除支付订单
export function delTrade(tradeId) {
    return request({
        url: '/logistics/trade/' + tradeId,
        method: 'delete'
    })
}

// 支付订单
export function payTradeAdd(tradeId) {
    return request({
        url: '/logistics/trade/payTradeAdd/' + tradeId,
        method: 'get'
    })
}